/**
 * 我们的task对象结构：
 * <p>
 * {id:1111,
 * userId:xxxx,
 * importanceValue:xxx
 * content:xxx
 * date:xxx
 * createTime:xxx
 * startTime:xxx
 * endTime:xxx
 * realEndTime:xxx
 * isDone:xxx
 * del:xxx
 * }</p>
 * @Description: 本文件用于配置indexedDB数据库
 * @author Fengli
 * @date 4/17/19
 */
import Dexie from 'dexie/dist/dexie'
var taskDb

/**
 * 注意configDb方法要在第一个调用taskDb对象之前调用
 */
export function configDb () {
  taskDb = new Dexie('task')
  taskDb.version(11).stores({
    taskStore: '&id,del,isDone,date,startTime',
    weekSummaryStore: '&id,&year,n,content'
  })
}
export {taskDb}
